Input field
Type
widget
Description
Text fields allow users to enter text into a UI. They typically appear in forms and dialogs.
Children Properties
Message
Name | Summary | Syntax |
---|---|---|
stateChanged | This message is sent when the widget 'state' is changed. | stateChanged pState |
textChanged | Sent when the content of the widget has changed. | textChanged |
keyDown | Sent when the user presses a key.v | keyDown pKeyName |
keyUp | Sent when the user releases a pressed key. | keyUp pKeyName |
rawKeyDown | Sent when the user presses any key. | rawKeyDown pKeyCode |
rawKeyUp | Sent when the user releases any key that was pressed other than a modifier key. | rawKeyUp pKeyCode |
rectChanged | Sent when the widget rect is modified by its content. | rectChanged |
selectionChanged | Sent to a field widget when the selection is changed. | selectionChanged |
Property
Name | Summary | Syntax |
---|---|---|
state | The current state of the widget. | set the state of <widget> to state get the state of <widget> |
supportingTextColor | The color of the widget supporting text. | set the supportingTextColor of <widget> to <Color> get the supportingTextColor of <widget> |
textAlign | The alignment of the text | set the textAlign of <widget> to textAlign get the textAlign of <widget> |
lockText | Make the widget non editable. | set the lockText of <widget> to {true | false} get the lockText of <widget> |
counterMaxLength | The number of characters allowed. | set the counterMaxLength of <widget> to pLength get the counterMaxLength of <widget> |
variant | The stye of the widget. | set the variant of <widget> to variant get the variant of <widget> |
focusColor | The color used to remark when widget is focused. | set the focusColor of <widget> to <Color> get the focusColor of <widget> |
leadingIcon | Show the leading icon. | set the leadingIcon of <widget> to {true | false} get the leadingIcon of <widget> |
text | The text contained in the field widget. | set the text of <widget> to pText get the text of <widget> |
label | The label of the text field | set the label of <widget> to pLabel |
prefix | The prefix text. | set the prefix of <widget> to pText get the prefix of <widget> |
floatLabel | The behavior of the label. | set the floatLabel of <widget> to floatLabel get the floatLabel of <widget> |
counterEnabled | The character counter of the field widget | set the counterEnabled of <widget> to {true | false} get the counterEnabled of <widget> |
backgroundColor | The color of the widget's background. | set the backgroundColor of <widget> to <Color> get the backgroundColor of <widget> |
iconSize | The size of the arrow icon of the widget | set the iconSize of <widget> to pIconSize get the iconSize of <widget> |
placeholderEnabled | Show a placeholder. | set the placeholderEnabled of <widget> to {true | false} get the placeholderEnabled of <widget> |
formattedWidth | Reports the width needed by the field to display its full contents without scrolling. | get the formattedWidth of <widget> |
roundedRadius | The radius of the widget corners | set the roundedRadius of <widget> to pRoundedRadius get the roundedRadius of <widget> |
formattedHeight | Reports the height needed by the field to display its full contents without scrolling. | get the formattedHeight of <widget> |
helperText | The text to be shown below the widget. | set the helperText of <widget> to pText get the helperText of <widget> |
saveContent | This boolean determines content saving behaviour. | set the saveContent of <widget> to {true | false} get the saveContent of <widget> |
errorEnabled | Activates the error states of the widget | set the errorEnabled of <widget> to {true | false} get the errorEnabled of <widget> |
textTheme | The text theme mappings of this widget | set the textTheme of <widget> to {<array>} get the textTheme of <widget> |
helperTextEnabled | show a assistive text below the widget. | set the helperTextEnabled of <widget> to {true | false} get the helperTextEnabled of <widget> |
showLabel | Make the label visible. | set the showLabel of <widget> to {true | false} get the showLabel of <widget> |
required | The widget content should be filled. | set the required of <widget> to {true | false} get the required of <widget> |
trailingIcon | Show the trailing icon. | set the trailingIcon of <widget> to {true | false} get the trailingIcon of <widget> |
hoverErrorColor | The color of the widget background when the mouse is hovering and the errorEnabled is true. | set the hoverErrorColor of <widget> to <Color> get the hoverErrorColor of <widget> |
prefixEnabled | Show a prefix text in front of content. | set the prefixEnabled of <widget> to {true | false} get the prefixEnabled of <widget> |
errorColor | The color of the widget text. | set the errorColor of <widget> to <Color> get the errorColor of <widget> |
themeData | The theme mappings of this widget | set the themeData of <widget> to {<array>} get the themeData of <widget> |
leadingIconName | The icon name of the leading icon. | set the leadingIconName of <widget> to pIcon get the leadingIconName of <widget> |
inputType | The type of content of the widget. | set the inputType of <widget> to inputType get the inputType of <widget> |
placeholderText | The text contained in the placeholder. | set the placeholderText of <widget> to pText get the placeholderText of <widget> |
visibilityToggle | Allows to temporarily unmask the content when inputType is 'password' | set the visibilityToggle of <widget> to {true | false} get the visibilityToggle of <widget> |
hoverColor | The hover color of the widget's background. | set the hoverColor of <widget> to <Color> get the hoverColor of <widget> |
suffix | The suffix text. | set the suffix of <widget> to pText get the suffix of <widget> |
borderColor | The color of the widget's border. | set the borderColor of <widget> to <Color> get the borderColor of <widget> |
suffixEnabled | Show a suffix text after the content. | set the suffixEnabled of <widget> to {true | false} get the suffixEnabled of <widget> |
borderHoverColor | The color of the widget's border when hovering. | set the borderHoverColor of <widget> to <Color> get the borderHoverColor of <widget> |
textColor | The color of the widget text. | set the textColor of <widget> to <Color> get the textColor of <widget> |
trailingIconName | The icon name of the trailing icon. | set the trailingIconName of <widget> to pIcon get the trailingIconName of <widget> |
textStyle | Use the textStyle property to change the appearance of text. | set the textStyle of object to {empty | plain | stylesList} |